home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pbaseiv.zip / P4DOS012.TIP < prev    next >
Text File  |  1991-12-16  |  2KB  |  50 lines

  1. I need to list files by name, extension, size, date, or
  2. time. To make this simple, I wrote DS.BAT [see listing]. The
  3. program uses the DOS SORT filter's /+n parameter to specify
  4. a beginning column for sorting.
  5.  
  6. Run the program by typing ds, followed by an optional file
  7. specification with wild cards, and either n for name order,
  8. e for extension, s for size, d for date, or t for time. You
  9. may type commands in either uppercase or lowercase. For
  10. example, ds c:\S123\S*.wks d lists by date all WKS files in
  11. the C:\S123 directory, while ds e displays by extension all
  12. files in the current directory. A simple ds lists by name
  13. all files in the current directory.
  14.  
  15. DS.BAT uses environment variables to store file
  16. specifications and sort-key column positions. If environment
  17. space is low, the program may not work correctly.
  18.  
  19. Derek E. Houseworth
  20. Bozeman, Montana
  21.  
  22. Editor's note: While all of DS.BAT's parameters are
  23. optional, you can't use the first (the file specification)
  24. without the second (the sort order). The command ds *.bat
  25. will list all of your files by file name; for BAT files
  26. only, type ds *.bat n.
  27.  
  28. If you have trouble using DS, you may have to insert a line
  29. such as SHELL=COMMAND.COM /E:512 /P in CONFIG.SYS. Change
  30. 512 to a greater number in order to reserve more bytes for
  31. environment variables. The /P option, which stands for
  32. "permanent," is needed for DOS to run AUTOEXEC.BAT.
  33.  
  34. Postscript: This tip was improved upon in "A Better Sort of
  35. Sort" (July 1991), which appears as another item on the DOS
  36. menu in PowerBase *.* Volume IV. Use the listing in that tip
  37. if you'd like to run DS.BAT. But it's worth noting that
  38. since both tips were published, MS-DOS 5.0 came out; it
  39. solves the problem once and for all with a built-in sort
  40. switch in the DIR command. The /O:<order> switch lets you
  41. sort a listing forward or backward by date and time, size,
  42. name, and extension. Thus, DS.BAT is only of use to you if
  43. you haven't upgraded to DOS 5.
  44.  
  45. Title: Sort of a Directory
  46. Category: DOS
  47. Issue date: Mar 1991
  48. Editor: Tom Swan
  49. Supplementary files: NONE
  50.